#include "main.h"
#include "math.h"
void drawSin(Point<GLint> center, GLint delta)
{
    glBegin(GL_POINTS);
    for (GLdouble x = -delta / 2; x < delta / 2;)
    {
        glVertex2d(center.x + x * 20, sin(x) * 20 + center.y);
        x += 0.05;
    }
    glEnd();
}

void fun3_rotate()
{

    glPushMatrix();
    glColor3b(127, 0, 0);
    for (size_t i = 0; i < 18; i++)
    {
        glRotated(10, 0, 0, 10);
        drawSin({0, 0}, 20);
    }
    glPopMatrix();
}

void fun3_rotate(GLdouble offset)
{

    glPushMatrix();
    glRotated(offset, 0, 0, 10);
    glColor3b(127, 0, 0);
    for (size_t i = 0; i < 18; i++)
    {
        glColor3b(127, 0, 0);
        glRotated(10, 0, 0, 10);
        drawSin({0, 0}, 20);
    }
    glPopMatrix();
}
